package com.qdaily.ui.ui.views;

import android.app.Dialog;
import android.content.Context;
import android.view.View;
import com.qdaily.ui.R;

/**
 * Created with IntelliJ IDEA.
 * User: Felix
 * Date: 5/21/15
 * Time: 17:06
 * QQ:74104
 * Email:lovejiuwei@gmail.com
 */
public class GuideDialog extends Dialog {

    public GuideDialog(Context context) {
        this(context, R.style.dialog_style);
    }

    public GuideDialog(Context context, int theme) {
        super(context, R.style.dialog_style);

        initViewRes();
    }

    private void initViewRes() {
        setContentView(R.layout.view_guide_sidebar);

//        this.setCanceledOnTouchOutside(true);
//        this.setCancelable(false);
//        this.imageViewGuideSlogan = (ImageView) findViewById(R.id.imageViewGuideSlogan);
//        this.imageViewGuideSlogan.setOnClickListener(new View.OnClickListener() {
//            @Override
//            public void onClick(View v) {
//                GuideDialog.this.cancel();
//            }
//        });
    }

    public void displayHomeGuide() {
        setContentView(R.layout.view_guide_home);
        findViewById(R.id.relativeLayoutGuideHome).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                cancel();
            }
        });
    }

    public void displaySidebarGuide() {
        setContentView(R.layout.view_guide_sidebar);
        findViewById(R.id.relativeLayoutGuideSidebar).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                cancel();
            }
        });
    }

}
